home *** CD-ROM | disk | FTP | other *** search
/ MacTech 1 to 12 / MacTech-vol-1-12.toast / Source / MacTech® Magazine / Volume 06 - 1990 / 06.02 Feb 90 / Bit Mapper Source / BTMP1 / BitMapperRsrc.h < prev    next >
Encoding:
C/C++ Source or Header  |  1989-11-19  |  2.0 KB  |  82 lines  |  [TEXT/KAHL]

  1. /* ======================================= *
  2.     file:    BitMapperRsrc.h
  3.     date:    11.17.89
  4.  * --------------------------------------- *
  5.     Header file for C and Rez for the
  6.     BitMapper SuperPaint plug-in tool.
  7.     Contains symbolic constants, data type
  8.     and resource type definitions that are
  9.     common to both the C and Rez components
  10.     of the project.  Utilizes the Rez
  11.     compiler symbol, “REZ”, to conditionally
  12.     include/exclude definition lines as
  13.     necessary.
  14.  * --------------------------------------- *
  15.     Copyright © 1989, Michael Ogawa and
  16.     MacTutor — All Rights Reserved.
  17.  * ======================================= */
  18.  
  19. #ifndef _H_BitMapperRsrc
  20. #define _H_BitMapperRsrc
  21.  
  22. #ifdef REZ
  23. #    ifndef bold
  24. #        include "Types.r"
  25. #        include "SysTypes.r"
  26. #    endif bold
  27. #endif REZ
  28.  
  29.  
  30. /* constants ============================= */
  31.  
  32. #define kOrigBaseID        16000
  33. /*    All resources of plug-in tools should be
  34. numbered consecutively from a base resource
  35. ID.  This is the ID# we are using as our base
  36. ID. */
  37. /*    m_o 09.13.89 */
  38.  
  39.  
  40. #define kType_BitMap    'BTMP'
  41. /*    Resource type of our custom bitmap and
  42. image resource that we create with
  43. BitMapper. */
  44. /*    m_o 09.13.89 */
  45.  
  46.  
  47. #define kALRT_Err    0        /* + baseID */
  48. #define kDITL_Err    kALRT_Err    /* + baseID */
  49. #define kactb_Err    kALRT_Err    /* + baseID */
  50. /*    ID offsets for the error alert
  51. resources, based off of the base resource ID.
  52. The resources are Rez compiled with these
  53. resource IDs plus kOrigBaseID.  They are
  54. calculated at runtime based on the value in
  55. the toolID field of the menu command data
  56. record that is passed in to our tool. */
  57. /*    m_o 09.17.89 */
  58.  
  59.  
  60. /* data types ============================ */
  61.  
  62. #ifndef REZ
  63. typedef struct {
  64.     BitMap    map;
  65.     short    image[];        
  66. } TBTMP, *TBTMPPeek, **TBTMPPkHndl;
  67. typedef BitMap    *TBTMPPtr, **TBTMPHndl;
  68. #else
  69. type kType_BitMap {
  70.     unsigned longint = 0; /* map.baseAddr */
  71.     integer;            /* map.rowBytes */
  72.     rect;            /* map.bounds */
  73.     hex string;        /* image */
  74. };
  75. #endif REZ
  76. /*    Data structure for our custom bitmap and
  77. image resource type. */
  78. /*    mps 06.22.89/m_o 06.25.89 */
  79.  
  80.  
  81. #endif _H_BitMapperRsrc
  82.